home *** CD-ROM | disk | FTP | other *** search
Text File | 1990-06-14 | 3.6 KB | 52 lines | [TEXT/KAHL] |
- /************************************************************************************/
- /* */
- /* This is a hardware level MIDI interface driver. It provides direct access to */
- /* the SCC ports when connected to a MIDI interface that provides it's own clock. */
- /* It is an interrupt-driven asynchronous driver that uses two circular buffers to */
- /* queue the data being transferred. It provides it's own routines to service the */
- /* Level 2 secondary interrupts for the SCC port being used. The driver MUST be */
- /* closed properly before it's memory is deallocated, as it replaces the vectors in */
- /* the Lvl2DT table, and these must be replaced with the original ones. */
- /* This driver doesn't do anything fancy, like time-stamp the MIDI data. It's */
- /* only reason for being is to get data from the outside world to your computer. */
- /* What you do with it after that is your business. */
- /* In order to do this, I have set up two circular buffers that are fed and emptied */
- /* via two assembly language routines that are accessed through usurped LVL2DT */
- /* vectors. Reads and Writes to the driver interact with these buffers, as opposed */
- /* to direct port access. */
- /* */
- /* If you really want to find out what's going on here, you should read that nasty */
- /* little rag that Zilog supplies with their Z3580 chip. It does tell you all that */
- /* you need to know about the SCC, but you may have to read it over several times */
- /* and consult Sister Zapposky's Tarot Emporium to figure it out. */
- /* */
- /* This project took a lot of blood, sweat and tears, so I am offering it as */
- /* example code, or even as a useable DRVR. It works beautifully in Pluses, SEs */
- /* and IIs. I spent many late evenings reading that cheezy Zilog manual, and */
- /* trying to keep from throwing a fit every time my Mac did. I finally got it */
- /* working, and working well, so enjoy. If nothing else, it should be a good */
- /* example of a DRVR. */
- /* */
- /* A note: This program uses a "hole" in the CODE segment to store a pointer to a */
- /* private globals structure in a similar manner to THINK C's SetUpA4 () routine. */
- /* The MyStash () routine returns this pointer. I know it's pretty nasty, but it */
- /* works like a charm! Anyway, I've encapsuled it's access to one routine that can */
- /* easily be modified to accomodate any better methods. */
- /* */
- /* I also opted for a very illegal control call to adjust the size of the I/O */
- /* buffers. This can easily be changed to use the same method that the serial */
- /* driver does. All you would have to do is replace the buffer pointers with your */
- /* own, and figure a way to properly dispose of the default buffers. I suggest you */
- /* keep auxilliary pointers to them, and dispose them at the driver's close. */
- /* */
- /* This program is being distributed as a demo only! If you plan to use it in a */
- /* commercial product, please contact me at: AL:D5070, MARSHALL.CHR, */
- /* (301) 990-7773, or (301) 340-4573. - Chris Marshall */
- /* */
- /* At the time of this writing, I am working for GE Information Services. */
- /* 401 N. Washington St. M/S: MNC3J, Rockville, MD 20850 */
- /* */
- /* My home address is: 401 Blue Silk Lane Apt. C, Gaithersburg, Maryland 20879 */
- /* */
- /************************************************************************************/
-